projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2c3197
)
driver: net: ldpaa: Update priv->phydev after free()
author
Prabhakar Kushwaha
<
[email protected]
>
Wed, 15 Feb 2017 15:26:03 +0000
(20:56 +0530)
committer
Joe Hershberger
<
[email protected]
>
Mon, 14 Aug 2017 17:47:33 +0000
(12:47 -0500)
Even after memory free of phydev, priv is still pointing to the
obsolete address.
So update priv->phydev as NULL after memory free.
Signed-off-by: Prabhakar Kushwaha <
[email protected]
>
Signed-off-by: Ashish Kumar <
[email protected]
>
Acked-by: Joe Hershberger <
[email protected]
>
drivers/net/ldpaa_eth/ldpaa_eth.c
patch
|
blob
|
history
diff --git
a/drivers/net/ldpaa_eth/ldpaa_eth.c
b/drivers/net/ldpaa_eth/ldpaa_eth.c
index 4e61700d5d11423ab67402f22d8407194d850450..f235b622b6f39489ddbdce0cc13d3d428b470705 100644
(file)
--- a/
drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/
drivers/net/ldpaa_eth/ldpaa_eth.c
@@
-587,8
+587,10
@@
static void ldpaa_eth_stop(struct eth_device *net_dev)
#ifdef CONFIG_PHYLIB
if (priv->phydev && bus != NULL)
phy_shutdown(priv->phydev);
- else
+ else
{
free(priv->phydev);
+ priv->phydev = NULL;
+ }
#endif
ldpaa_dpbp_free();